package com.fzz.netty.study.ws;

import com.fzz.netty.study.ws.websocket.NioWebSocketServer;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;


public class NettyInitListen implements CommandLineRunner {

//    @Value("${netty.port}")
//    Integer nettyPort;
//    @Value("${server.port}")
//    Integer serverPort;

    @Override
    public void run(String... args) throws Exception {
        try {
            System.out.println("nettyServer starting ...");
            System.out.println("http://127.0.0.1:" + 17000 + "/login");
            new NioWebSocketServer().init();
        } catch (Exception e) {
            System.out.println("NettyServerError:" + e.getMessage());
        }
    }
}